1. Field of the Invention
This invention relates in general to data storage devices, and more particularly to a method, apparatus and program storage device for protecting data write operations against write failures in a data storage device.
2. Description of Related Art
Disk drives are a form of data storage wherein data is read from and written onto storage media. There are different types of disk drives for different types of storage media. Different types of storage media include magnetic hard disks, floppy disks and optical disks. Although the term disk drive is used throughout this document, the storage media may not be in the form of a disk, but instead may be implemented in another form, for example, tape storage. Disk drives can be either internal and housed within a computer or external and housed separately from a computer.
Disk drives may be used in storage systems in which a plurality of separate disk drives is combined into a single storage system. Such storage systems include RAID (redundant array of independent disks) architectures, which use several low-cost disk drives to create a large and reliable storage system.
Disk drives may use caching to improve their performance. A cache is a small fast memory holding recently accessed or written data. When data is read from or written to a storage medium, a copy is also saved in the cache, along with the associated medium storage address. A disk cache can be implemented in software in a computer or in hardware in a disk drive.
A read cache is used to save a copy of data that is read from a storage medium. The read cache monitors addresses of subsequent reads to see if the required data is already in the read cache. If it is, then it is returned immediately and the read of the storage medium can be aborted. If it is not already in the cache, the data is read from the storage medium and saved in the read cache.
A write cache can be a write-through cache in which data is written to the storage medium at the same time as it is cached. In a write-through cache, an entry that is to be replaced can be overwritten in the cache. Alternatively, a write cache can be a write-back cache in which data is only written to the storage medium when it is forced out of the cache.
Data that is written to disk drives is assumed to have been saved if the drive indicates a good completion to the write operation, with no errors reported. However, there remains a small possibility for error, in which the drive itself is unable to detect whether the data has been correctly recorded without re-reading the data and comparing it to the written data. Situations in which such an error occurs are known as dropped write failures. Any data which is not otherwise backed up or protected will be permanently lost in a dropped write failure and so a defense against this possibility is needed.
Most conventional methods imply a much longer write operation using a readback check to verify that the written data is safe. These are not efficient methods since they execute on all writes, but will very rarely detect a failure. This means that all of the good writes carry an unnecessary performance penalty.
It can be seen that there is a need for a method, apparatus and program storage device for protecting data write operations against write failures in a data storage device.